/**
 * Copyright (C) 2025 pony working team
 * SPDX-License-Identifier: MulanPSL-2.0
 */

/* define to prevent recursive inclusion -------------------------------------*/
#ifndef __PONY_STM32_PSRAM_H__
#define __PONY_STM32_PSRAM_H__

/* includes (standard library, system) ---------------------------------------*/
/* includes (other library) --------------------------------------------------*/
/* includes (project) --------------------------------------------------------*/
#include <hal_mtd.h>
/* includes (local) ----------------------------------------------------------*/
#include <aps512xx.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* defines -------------------------------------------------------------------*/

#define PSRAM_BASE_ADDR   0xA0000000
#define PSRAM_DEVICE_SIZE APS512XX_RAM_SIZE

/* typedefs ------------------------------------------------------------------*/

/* ioctl cmds */
enum psram_cmd {
    /* ioctl(mtd, cmd, size_t) */
    PSRAM_CMD_MEMORY_MAPPED = HAL_MTD_CMD_CUSTOM + 1, /* 1-enable, 0-disable */
};

/* macro ---------------------------------------------------------------------*/
/* inlines -------------------------------------------------------------------*/
/* externs -------------------------------------------------------------------*/

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __PONY_STM32_PSRAM_H__ */
